// pages/detail/detail.js
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var self = this
    wx.request({
      url: app.globalData.baseUrl + 'users/get',
      data: {
        session: wx.getStorageSync("session"),
        id: options.id
      },
      method: "POST",
      success: function (res) {
        if (res.data.code === '000000') {
          self.setData({
            id: res.data.body.id,
            question: res.data.body.question,
            content: res.data.body.content
          })
        }
      }
    })
  }
})